package com.yowasa.xiuxian.engine.item.zhuangbei.faqi;

import com.yowasa.xiuxian.annoations.Item;
import com.yowasa.xiuxian.engine.item.ItemInterface;
import com.yowasa.xiuxian.entity.bo.user.UserBO;
import com.yowasa.xiuxian.entity.enums.ItemTypeEnum;
import com.yowasa.xiuxian.entity.enums.QualityEnum;


@Item(name = "异世界行纪", type = ItemTypeEnum.WU_QI, price = 3000)
public class YiShiJieXingJi implements ItemInterface {

    private String attrJson = "{" +
            "\"hp\":0," +
            "\"mp\":0," +
            "\"atk\":0," +
            "\"spell\":10," +
            "\"def\":0," +
            "\"res\":20," +
            "\"imm\":0," +
            "\"spd\":0," +
            "\"quality\":0" +
            "}";


    @Override
    public String desc() {
        return "廉价的幻想小说，不具备参考价值，作为法器的力量当然也来自幻想。\n增加少量的法攻和法抗。";
    }

    @Override
    public String effect(UserBO userBO) {
        if (!userBO.getUserConfig().getBattleStrategyList().contains("能量沐浴")){
            userBO.getUserConfig().getBattleStrategyList().add("能量沐浴");
        }
        return "现在可以使用能量沐浴了！！！";
    }

    @Override
    public String removeEffect(UserBO userBO) {
        if (userBO.getUserConfig().getBattleStrategyList().contains("能量沐浴")){
            userBO.getUserConfig().getBattleStrategyList().remove("能量沐浴");
        }
        return "遗忘了能量沐浴！！！";
    }


    //血，蓝，     物攻，     法攻，    物抗，    法抗，    免疫，    速度
    //{"hp":603,"chp":603,"mp":97,"cmp":97,"atk":26,"spell":14,"def":38,"res":14,"imm":25,"spd":243}
    public String attr(QualityEnum qualityEnum){
        String attr = getAttr(qualityEnum, attrJson);
        return attr;
    }

}

